package com.hxgis.statisticanalysis.intelligentIndicator.pojo;

import cn.hutool.json.JSONArray;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author 赵恒
 * @date 2022/12/12
 */
@NoArgsConstructor
@Data
@TableName(value = "work_order_info", autoResultMap = true)
@JsonIgnoreProperties(ignoreUnknown = true)
public class WorkOrderInfo {
    @JsonProperty("id")
    private String id;
    @JsonProperty("number")
    private String number;
    @JsonProperty("title")
    private String title;
    @JsonProperty("status")
    private Integer status;
    @JsonProperty("attentioned")
    private Integer attentioned;
    @JsonProperty("executors")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONArray executors;

    @JsonProperty("creator_id")
    private String creatorId;
    @JsonProperty("creator_name")
    private String creatorName;
    @JsonProperty("model_id")
    private String modelId;
    @JsonProperty("model_name")
    private String modelName;
    @JsonProperty("activity_id")
    private String activityId;
    @JsonProperty("activity_name")
    private String activityName;
    @JsonProperty("urgent_level")
    private Integer urgentLevel;
    @JsonProperty("create_time")
    private Date createTime;

    /**
     * 工单完成时间
     */
    @TableField(exist = false)
    private double completeHour;
}